while True:
    str1 = input("请输入一行字符:")
    blank = 0
    word = 0
    number = 0
    other = 0

    for i in str1:
        if i.isalpha():
            word += 1
        elif i.isdigit():
            number += 1
        elif i.isspace():
            blank += 1
        else:
            other += 1
    print("空格:",blank,",字母:",word,",数字:",number,",其他:",other,"\n")
